<?php
// +----------------------------------------------------------------------
// | Huncent Tinysupe [ SIMPLE IS THE BEST ! ]
// +----------------------------------------------------------------------
// | Copyright (c) 2011 ZMRNet Studio, All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: tinysu <tinysu@qq.com>
// +----------------------------------------------------------------------

@session_start();
@date_default_timezone_set('RPC');

// safe checking
if(version_compare(PHP_VERSION,'5.0.0','<')) die('require PHP > 5.0 !');
if(!empty($_GET)) exit(header('HTTP/1.0 404 Not Found'));

define('VERSION', '2.1');
define('RUNTIME', microtime(true));
define('COREDIR', dirname(__FILE__));	// Tinysupe's core directory

// load kernel
require(COREDIR .'/kernel/cores.php');
require(COREDIR .'/kernel/dbase.php');
class_exists('theme') or require(COREDIR .'/kernel/theme.php');
require(COREDIR .'/kernel/model.php');
require(COREDIR .'/kernel/kernel.php');

// compatible rewrite
if(REWRITE){
	define('_WEBEXT', HTMLEXT);
	define('_WEBDIR', ht_sitedir());
}else{
	define('_WEBEXT', '');
	define('_WEBDIR', $_SERVER['SCRIPT_NAME'] .'/');
}

// start kernel
$kernel = new kernel();
unset($kernel);
?>